//
//  DetaileBelleViewController.m
//  PhoenixNews
//
//  Created by dllo on 16/1/18.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "DetaileBelleViewController.h"

@interface DetaileBelleViewController ()

@end

@implementation DetaileBelleViewController
// 美女跳转详情页面
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    //处理传过来的网址
    NSString *str = self.imageStr;
    NSURL *url = [NSURL URLWithString:str];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    // 设置webView
    UIWebView *web = [[UIWebView alloc] initWithFrame:CGRectMake(0, 64, self.view.frame.size.width, self.view.frame.size.height - 100)];
    web.backgroundColor = [UIColor whiteColor];
    [web loadRequest:request];
    web.scalesPageToFit = YES;
    [self.view addSubview:web];
    [web release];
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(20, self.view.frame.size.height - 40, 60, 40);
    [button setImage:[UIImage imageNamed:@"block"] forState:UIControlStateNormal];
    [button addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    
    [self.view addSubview:button];
    // Do any additional setup after loading the view.
}
- (void)buttonAction:(UIButton *)sender {
    [self dismissViewControllerAnimated:YES completion:^{
        nil;
    }];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
